

CXX = g++

CPPS = $(wildcard *.cpp) $(wildcard ext/*.cpp)
OBJS = $(patsubst %.cpp,%.o,$(CPPS))

INCLUDES= \
	-I $(CIL) \
	-I $(CILSTUB) \
	-I $(MLHEADER) \
    -I $(CILAST) \
  
LIBS = \
	-L $(CIL) \
	-L $(CILSTUB) \
	-L $(MLLIB) \
    -L $(CILAST) \
    
#all : ast.c
#	gcc $(DEBUG) $(INCLUDES) $(LIBS) -o ltlbmc ast.c -lcil -lcilstub \
#	-lm -lcurses -ldl -lcamlstr -lnums -lunix -lasmrun 

all : $(OBJS) 
	ar -r $(CILAST)/libcilast.a $(OBJS)
    
%.o : %.cpp
	$(CXX) $(DEBUG) $(INCLUDES) $(LIBS) -c $< -o $(patsubst %.cpp,%.o,$<)
    
clean :
	rm -rf *.o *.a
    
